﻿#ifndef GAMEROLE_H
#define GAMEROLE_H

#include "RoleStateMemento.h"
#include <memory>

using namespace std;

class GameRole
{
private:
    int m_hp;  //生命力
    int m_atk;  //攻击力
    int m_def;  //防御力
public:
    GameRole();
    void stateDisplay();
    void getInitState();
    void fight();
    shared_ptr<RoleStateMemento> saveState();
    void recoveryState(shared_ptr<RoleStateMemento> memento);
    int getHp() const;
    void setHp(int hp);
    int getAtk() const;
    void setAtk(int atk);
    int getDef() const;
    void setDef(int def);
};

#endif // GAMEROLE_H
